import request from '../utils/request'

export function login (params) {
  return request({
    url: '/login',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: params
  })
}
export function registered (params) {
  return request({
    url: '/user/registered',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: params
  })
}

export function userInfo (params) {
  return request({
    url: '/article/user',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function serach (params) {
  return request({
    url: '/article/search',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
		data: params
  })
}